package com.chuangjiangx.member.basic.ddd.dal.dto;

import com.chuangjiangx.member.basic.ddd.domain.model.MbrSourceTerminal;
import lombok.Getter;

/**
 * @author cj-ch
 * @date 2018/6/19 下午5:50
 * 按注册终端占比
 */

public class TerminalScales extends MbrCount{
    /**
     * 终端编号
     * @see com.chuangjiangx.domain.shared.model.PayTerminal
     */
    @Getter
    private Integer code ;

    @Getter
    private String name ;

    public void setCode(Integer code) {
        this.code = code;
        MbrSourceTerminal sourceTerminal = MbrSourceTerminal.getSourceTerminal(code.byteValue());
        name = (null == sourceTerminal ? "未知" : sourceTerminal.name);
    }
}
